﻿<%@ page language="java" import="java.util.*,com.entity.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<script>
function openwindow(str)
{
  window.open("doTree.jsp?sid="+str+"&pd=","部门","height=380,width=260,top=230,left=450,scrollbars=yes"); 
   //showModalDialog("doTree.jsp","部门","height=380,width=260,top=230,left=250,scrollbars=yes");
}
function yz(){
		//var bmbh=document.getElementById("bmbh").value;
		var endDate=document.getElementById("endDate").value;
		
		if(endDate==""){
		alert("请选择日期");
		return false;
		}
		
		return true;
		
	}
	
<%
if(request.getAttribute("result")!=null){
%>
alert('<%=request.getAttribute("result")%>');
<%
}
%>

</script>

</head>

<body  onload="loaddw();selectedaddr()">
  <%Dlyh dlyh = (Dlyh)request.getSession().getAttribute("dlyh");
  if((dlyh.getZd().getTypename().endsWith("乡")||dlyh.getZd().getTypename().equals("工业园区")||dlyh.getZd().getTypename().endsWith("镇")||dlyh.getZd().getTypename().endsWith("办")||dlyh.getZd().getTypename().endsWith("办事处")||dlyh.getZd().getTypename().endsWith("局")||dlyh.getZd().getTypename().endsWith("社")||dlyh.getZd().getTypename().endsWith("集团")||dlyh.getZd().getTypename().endsWith("院")||dlyh.getZd().getTypename().equals("民航"))){
   %>
  <input type="hidden" value="<%=request.getSession().getAttribute("shiqyid") %>" id="shiqyid" name="shiqyid" />
  <%}%>
  <input type="hidden" value="<%=dlyh.getZd().getParentid() %>" id="qyid" name="qyid" />
  <input type="hidden" value="<%=dlyh.getZd().getTypename() %>:<%=dlyh.getZd().getId() %>:<%=dlyh.getZd().getParentid() %>" id="dlyhzd" name="dlyhzd" />
  <input type="hidden" value="<%=request.getAttribute("shi") %>" id="shiid" name="shiid" />
  <input type="hidden" value="<%=request.getAttribute("xian") %>" id="xianid" name="xianid" />
  <input type="hidden" value="<%=request.getAttribute("xiang") %>" id="xiangid" name="xiangid" />
  <input type="hidden" value="<%=request.getAttribute("cun")%>" id="cunid" name="cunid" />
  <input type="hidden" value="<%=request.getAttribute("xianzhi") %>" id="xianzhi" name="xianzhi" />
  <script language="javascript" type="text/javascript" src="js/qy1.js"></script>
<form id="form1" name="form1" method="post" action="gz.do" onsubmit="return yz();">
<input type="hidden" value="" name="falg" id="falg"/>
<input type="hidden" value="<%=request.getParameter("sname") %>" name="sname" id="sname"  >
<%if((dlyh.getZd().getTypename().endsWith("市")&&dlyh.getZd().getParentid().equals(745))||dlyh.getZd().getTypename().equals("河北省")) {%>
    <div style="display: none">
请选择单位：
  <select disabled="disabled" id="sheng" name="sheng" >
           <option value="河北省">河北省</option>
        </select>市
        <select id="shi" name="shi" onchange="shichange(this.value)">
           <option>请选择市</option>
           <%List xianlist=(List) request.getSession().getAttribute("shilist"); 
            for(int i=0;i<xianlist.size();i++){%>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option>请选择县</option>
        </select>县
        <select id="xiang"  name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun"  name="cun" >
        <option >请选择村</option>
        </select>村<br />
  </div>
  <%} else{%>请选择单位：
   <select disabled="disabled" id="shi" name="shi" >
           <option value="邯郸市">邯郸市</option>
        </select>市
        <select id="xian" name="xian" onchange="xianchange(this.value)">
           <option >请选择县</option>
        <%List xianlist=(List) request.getSession().getAttribute("zdidlist"); 
          for(int i=0;i<xianlist.size();i++){
        %>
           <option value="<%=((Zd)xianlist.get(i)).getId() %>"><%=((Zd)xianlist.get(i)).getTypename() %></option>
           <%} %>
        </select>县
        <select id="xiang" name="xiang" onchange="xiangchange(this.value)" >
         <option >请选择乡</option>
        </select>乡
        <select id="cun" name="cun" >
        <option >请选择村</option>
        </select>村<br />
  <%} %>
  <!-- <input type="text" name="bm" id="bm"  class="SmallInput" onclick="openwindow(1)"  disabled="disabled"/>
  <a href="javascript:openwindow(1);">选择</a><br /> -->
  请选择日期：
  <input type="text" name="endDate" id="endDate"  class="SmallInput" onfocus="WdatePicker()" />  
  日期应大于当前日期<br />
  <input type="submit" name="button" id="button" value="查看统计表"  onclick="document.getElementById('falg').value='';"/>
  <input type="hidden" id ="bmbh" name="bmbh"  />
</form>
</body>
</html>
